package com.onetech.adrewards.free.fragments;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;

public class ImageGuideFragment extends Fragment {
	public static final String EXTRA_MESSAGE = "EXTRA_MESSAGE";
	private int imageResource;
	public static final ImageGuideFragment newInstance(String message,
			int _imageResource) {
		ImageGuideFragment f = new ImageGuideFragment();
		f.imageResource = _imageResource;
		return f;
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		
		ImageView image = new ImageView(getActivity());		
		image.setBackgroundResource(imageResource);
		
		LinearLayout layout = new LinearLayout(getActivity());
		layout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
				LayoutParams.FILL_PARENT));

		layout.setGravity(Gravity.CENTER);
		layout.addView(image);

		return layout;

	}

}
